package com.spms.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.spms.entity.Practice;
import com.spms.entity.PracticeDetail;
import com.spms.entity.Student;
import com.spms.entity.Teacher;
import com.spms.mapper.TeacherMapper;
import com.spms.service.TeacherService;

@Service
public class TeacherServiceImpl implements TeacherService {
	
	@Autowired
	private TeacherMapper teachermapper;
	
	@Override
	public int T_InsertPractice( String p_name, String address, String t_id, String start_time,
			String end_time) {
		// TODO Auto-generated method stub
		return teachermapper.T_InsertPractice(p_name,address,t_id,start_time,end_time);
	}

	@Override
	public int T_UpdatePractice(int p_id, String p_name, String address, int t_id, String start_time, String end_time) {
		// TODO Auto-generated method stub
		return teachermapper.T_UpdatePractice( p_id,  p_name, address,t_id, start_time, end_time);
	}

	@Override
	public int T_DeletePractice(int p_id, int t_id) {
		// TODO Auto-generated method stub
		return teachermapper.T_DeletePractice(p_id,t_id);
	}

	
	@Override
	public List<Practice> T_SelectPractice(int t_id) {
		// TODO Auto-generated method stub
		return teachermapper.T_SelectPractice(t_id);
	}

	@Override
	public int T_score(int p_id, int s_id, int score, int t_id) {
		// TODO Auto-generated method stub
		return teachermapper.T_score(p_id,s_id,score,t_id);
	}

	@Override
	public Teacher Login(String user_name, String user_password) {
		// TODO Auto-generated method stub
		return teachermapper.Login(user_name, user_password);
	}

	@Override
	public int Register(Teacher teacher) {
		return teachermapper.Register(teacher);
	}

	@Override
	public List<PracticeDetail> T_FindThink (int t_id) {
		// TODO Auto-generated method stub
		return teachermapper.T_FindThink(t_id);
	}

	@Override
	public int DeleteThink(int t_id, int s_id, int p_id) {
		// TODO Auto-generated method stub
		return teachermapper.DeleteThink(t_id, s_id, p_id);
	}

	@Override
	public List<Student> QuerySeletedStudent(int t_id,int p_id){
		return teachermapper.QuerySeletedStudent(t_id, p_id);
	}

}
